package com.misty.admin.service;

import com.misty.common.bean.Result;
import com.misty.dao.domain.Users;
import com.baomidou.mybatisplus.extension.service.IService;
import com.misty.dao.dto.UsersDto;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author cthulhu
 * @since 2022-11-21
 */
public interface UsersService extends IService<Users> {

    Result<?> saveUser(UsersDto user);

    @Transactional(transactionManager = "mistyTransactionManager")
    Result<?> updateUser(@RequestBody UsersDto user);

    Result<?> Page(Integer pageNum, Integer pageSize, String search
    );

    Result<?> getById(Integer id);

    Result<?> delete(Integer userId);
}
